package com.example.demo.api;


import com.example.demo.entity.Info;
import com.example.demo.entity.Report;
import com.example.demo.entity.User;

import java.util.List;

public class CommonResult {
    private long code;
    private String message;
    private List<Info> datas;
    private List<User> users;
    private String token;
    private Info info;
    private Report report;


    public CommonResult(long code, String message) {
        this.code = code;
        this.message = message;
    }

    public CommonResult(long code, String message, String token) {
        this.code = code;
        this.message = message;
        this.token = token;
    }

    public CommonResult(long code, String message, List<Info> datas) {
        this.code = code;
        this.message = message;
        this.datas = datas;
    }

    public CommonResult(long code, String message, List<User> users, String token) {
        this.code = code;
        this.message = message;
        this.users = users;
        this.token = token;
    }

    public CommonResult(long code, String message, Info info) {
        this.code = code;
        this.message = message;
        this.info = info;
    }

    public CommonResult(long code, String message, Info info, Report report) {
        this.code = code;
        this.message = message;
        this.info = info;
        this.report = report;
    }


    public static CommonResult result(long code, String message) {

        return new CommonResult(code, message);
    }

    public static CommonResult result(long code, String message, String token) {

        return new CommonResult(code, message, token);
    }

    public static CommonResult result(long code, String message, List<Info> datas) {

        return new CommonResult(code, message, datas);
    }

    public static CommonResult result(long code, String message, List<User> users, String token) {

        return new CommonResult(code, message, users, token);
    }

    public static CommonResult result(long code, String message, Info info) {

        return new CommonResult(code, message, info);
    }

    public static CommonResult result(long code, String message, Info info, Report report) {

        return new CommonResult(code, message, info, report);
    }


    public List<User> getUsers() {
        return users;
    }

    public void setUsers(List<User> users) {
        this.users = users;
    }

    public long getCode() {
        return code;
    }

    public void setCode(long code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<Info> getDatas() {
        return datas;
    }

    public void setDatas(List<Info> datas) {
        this.datas = datas;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public Info getInfo() {
        return info;
    }

    public void setInfo(Info info) {
        this.info = info;
    }

    public Report getReport() {
        return report;
    }

    public void setReport(Report report) {
        this.report = report;
    }

}
